<template>
  <el-input
    v-model="inputValue"
    placeholder="请输入要搜索的部门或员工"
    prefix-icon="el-icon-search"
    @input="onChange"
  ></el-input>
</template>

<script>
  export default {
    props: {
      searchValue: {
        type: String,
        default: '',
      },
    },
    data() {
      return {
        inputValue: this.searchValue,
      };
    },
    methods: {
      onChange(value) {
        this.$emit('change-search', value); //通知父组件改变
      },
    },
  };
</script>

<style></style>
